package org.gp953.product.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.gp953.basic.domain.BaseDomain;
import org.gp953.org.domain.Shop;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product extends BaseDomain {

    private String name;
    private String resources;
    private BigDecimal saleprice;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date onsaletime = new Date();
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date offsaletime = new Date();
    private Integer state = 0;
    private BigDecimal costprice;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createtime = new Date();;
    private Long salecount = 0L;
    private Shop shop;
    private ProductDetail detail = new ProductDetail();

}
